--[[
    author : wenshengyu
    date   : 2021-10-22
]]
local require = require
local misc = require("modules.business_common.utils.business_misc")
local time = require("modules.business_common.utils.business_time")
local table = require("modules.business_common.utils.business_table")
local string = require("modules.business_common.utils.business_string")

return {

    -- 索引到海马哥的utils库
    hm = require("modules.commhm.utils"),

    -- 时间相关接口
    get_today_zero_time = time.get_today_zero_time, -- 获取日零点时间戳
    get_week_zero_time  = time.get_week_zero_time,  -- 获取周零点时间戳
    get_month_zero_time = time.get_month_zero_time, -- 获取月零点时间戳
    is_same_day         = time.is_same_day,         -- 比较两个时间戳是否是同一天
    is_same_week        = time.is_same_week,        -- 比较两个时间戳是否是同一周
    is_same_month       = time.is_same_month,       -- 比较两个时间戳是否是同一月
    time_diff_by_day    = time.time_diff_by_day,    -- 两个时间相差多少天
    time_diff_by_week   = time.time_diff_by_week,   -- 两个时间相差多少周
    time_diff_by_month  = time.time_diff_by_month,  -- 两个时间相差多少月
    date_to_unix        = time.date_to_unix,        -- 把当地时间转化为UNIX时间
    unix_to_date        = time.unix_to_date,        -- 把UNIX时间转化为当地时间

    -- table相关接口
    foreach     = table.foreach,    -- table foreach
    table_copy  = table.copy,       -- table深拷贝
    table_getn  = table.getn,       -- table长度
    table_clone = table.clone,
    table2list  = table.to_list,
    transtable  = table.trans,
    transform   = table.trans,
    same_table  = table.same,

    -- 字符串相关接口
    split = string.split, -- 字符串切割函数

    -- 版本相关
    check_max_version = misc.version_max_check,
    check_min_version = misc.version_min_check,

    -- 杂项
    is_ssdb_pin = misc.is_ssdb_pin,
    real_client_ip = misc.real_client_ip,
}
